
<?php
	include "../admin/p_usuario/valida_credenciais.php";
	$valCr = new valida_credenciais();
	
	/*$nivel = array(1);
	if(!($valCr->validar($nivel))){
		header('Location: index.php?p=denied');
	}*/

?>

<script language="javascript" type="text/javascript" src="../admin/p_curso/valida_form.js"></script>
<div class="form">

	<div class="row">
		<div class="col-md-12">
			<div class="page-header">
				<h2>Adicionar Curso</h2>
			</div>
		</div>
	</div>
	<div class="row">
	<div class="col-md-3">
			<div class="actions">
				<div class="panel panel-default">
					<div class="panel-heading"><h5>Op&ccedil&otildees</h5></div>
						<div class="panel-body">
							<ul class="nav nav-pills nav-stacked">
								<li><a href="index.php?pg=cursos">Listar Cursos</a></li>
								
							</ul>
						</div>
					</div>
				</div>			
		</div><!-- end col md 3 -->
		<div class="col-md-9">
		<!-- HEAD DE FORMULÃ�RIO -->
		<div class="panel panel-default">
			<div class="panel-heading"><h5>Formul&aacuterio de Cadastro de Cursos</h5></div>
			<div class="panel-body">
			<!-- FORMULÃ�RIO -->
			<form  method="post" name="form1" action="../admin/p_curso/salvar.php" enctype="multipart/form-data">
				<div class="row">
					<div class="col-md-12 form-group"><h6>(<span class="text-danger">*</span>) Campos de preenchimento obrigat&oacuterio.</h6></div>
				</div>
				<div class="row">
					<div class="form-group col-md-9">
						<label for="curso">Curso (<span class="text-danger">*</span>)</label>
    					<input type="text" class="form-control" name="curso" id="curso" placeholder="Informe o nome do curso...">
					</div>
					<div class="form-group col-md-3">
						<label for="carga_horaria" title="CargaHoraria">Carga-Hor&aacuteria</label>
    					<input type="text" class="form-control" id="carga_horaria" name="carga_horaria" placeholder="Horas...">
					</div>
				</div>
				
				<div class="row">
					<div class="form-group col-md-6">
						<label for="categoria">Categoria do Curso (<span class="text-danger">*</span>)</label>
    					<select name="categoria" id="categoria" class="form-control">
		          			<option value='selecione'>Selecione...</option>
		          			<?php
									$query = mysql_query("SELECT `id_categoria_curso`, `descricao_categoria_curso`, `status` FROM categoria_curso WHERE `status` LIKE '1'");
									while($lista = mysql_fetch_array($query)) { ?> 
									<option value="<?php echo $lista['id_categoria_curso']; ?>"><?php echo $lista['descricao_categoria_curso']; ?></option>
								<?php }?>
		          		</select>
					</div>
					<div class="form-group col-md-3">
						<label for="preco">Pre&ccedilo do Curso</label>
    					<input type="text" class="form-control" id="preco" name="preco" placeholder="R$...">
					</div>
				</div>
				<div class="row">
					<div class="form-group col-md-12">
						<label for="desc_curso">Descri&ccedil&atildeo (<span class="text-danger">*</span>)</label>
    					<textarea rows="5" cols="" class="form-control" id="desc_curso" name="desc_curso" placeholder="Informe a Descri&ccedil&atilde;o..."></textarea>
					</div>
				</div>
				
				<div class="row">
					<div class="form-group col-md-2">
						<input type="submit" value="Avan&ccedil;ar" class="btn btn-default" name="enviar" onclick="return valida()" >
					</div>
				</div>
			</form>
			</div>
		</div>

		</div><!-- end col md 12 -->
	</div><!-- end row -->
</div>